package group2.service.impl;

import group2.mapper.UserMapper;
import group2.model.UserInfo;
import group2.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 周祖航
 * @date 2020/8/18 001823:12
 **/
@Service("userService")
public class UserServiceImpl implements UserService {
    //用户
    @Autowired
    UserMapper userMapper;
    //查所有
    @Override
    public List<UserInfo> userForSelectAll(){
        return userMapper.userForSelectAll();
    }
    //增
    @Override
    public boolean userForAdd(UserInfo user){
        return userMapper.userForAdd(user);
    }
    //删
    @Override
    public boolean userForDelete(int userId){
        return userMapper.userForDelete(userId);
    }
    //改
    @Override
    public boolean userForUpdate(UserInfo user){

        return userMapper.userForUpdate(user);

    }
}
